﻿@model OrderModel
<table class="adminContent">
    <tr>
        <td class="adminTitle">
            @Html.NopLabelFor(model => model.BillingAddress):
        </td>
        <td class="adminData">
            <table style="border: solid 1px black; padding: 5px;">
                @if (Model.BillingAddress.FirstNameEnabled || Model.BillingAddress.LastNameEnabled)
                {
                    <tr>
                        <td>
                            @T("Admin.Orders.Address.FullName"):
                        </td>
                        <td>
                            @Model.BillingAddress.FirstName @Model.BillingAddress.LastName
                        </td>
                    </tr>
                }
                @if (Model.BillingAddress.EmailEnabled)
                {
                    <tr>
                        <td>
                            @T("Admin.Orders.Address.Email"):
                        </td>
                        <td>
                            @Model.BillingAddress.Email
                        </td>
                    </tr>
                }
                @if (Model.BillingAddress.PhoneEnabled)
                {
                    <tr>
                        <td>
                            @T("Admin.Orders.Address.Phone"):
                        </td>
                        <td>
                            @Model.BillingAddress.PhoneNumber
                        </td>
                    </tr>
                }
                @if (Model.BillingAddress.FaxEnabled)
                {
                    <tr>
                        <td>
                            @T("Admin.Orders.Address.Fax"):
                        </td>
                        <td>
                            @Model.BillingAddress.FaxNumber
                        </td>
                    </tr>
                }
                @if (Model.BillingAddress.CompanyEnabled)
                {
                    <tr>
                        <td>
                            @T("Admin.Orders.Address.Company"):
                        </td>
                        <td>
                            @Model.BillingAddress.Company
                        </td>
                    </tr>
                }
                @if (Model.BillingAddress.StreetAddressEnabled)
                {
                    <tr>
                        <td>
                            @T("Admin.Orders.Address.Address1"):
                        </td>
                        <td>
                            @Model.BillingAddress.Address1
                        </td>
                    </tr>
                }
                @if (Model.BillingAddress.StreetAddress2Enabled)
                {
                    <tr>
                        <td>
                            @T("Admin.Orders.Address.Address2"):
                        </td>
                        <td>
                            @Model.BillingAddress.Address2
                        </td>
                    </tr>
                }
                @if (Model.BillingAddress.CityEnabled)
                {
                    <tr>
                        <td>
                            @T("Admin.Orders.Address.City"):
                        </td>
                        <td>
                            @Model.BillingAddress.City
                        </td>
                    </tr>
                }
                @if (Model.BillingAddress.StateProvinceEnabled)
                {
                    <tr>
                        <td>
                            @T("Admin.Orders.Address.StateProvince"):
                        </td>
                        <td>
                            @Model.BillingAddress.StateProvinceName
                        </td>
                    </tr>
                }
                @if (Model.BillingAddress.ZipPostalCodeEnabled)
                {
                    <tr>
                        <td>
                            @T("Admin.Orders.Address.ZipPostalCode"):
                        </td>
                        <td>
                            @Model.BillingAddress.ZipPostalCode
                        </td>
                    </tr>
                }
                @if (Model.BillingAddress.CountryEnabled)
                {
                    <tr>
                        <td>
                            @T("Admin.Orders.Address.Country"):
                        </td>
                        <td>
                            @Model.BillingAddress.CountryName
                        </td>
                    </tr>
                }
                @if (!Model.IsLoggedInAsVendor)
                {
                    <tr>
                        <td colspan="2">
                            <a href="@Url.Action("AddressEdit", new { addressId = Model.BillingAddress.Id, orderId = Model.Id })" class="k-button">@T("Admin.Common.Edit")</a>
                        </td>
                    </tr>
                }
            </table>
        </td>
    </tr>
</table>
